import Mock from "mockjs"
import homeApi from "./mockServeData/home"
import user from "./mockServeData/user"
import permission from "./mockServeData/permission";

// 定义首页请求拦截
Mock.mock("/api/home/getData", homeApi.getStatisticalData); // 如果是git可以省略不写

// 定义用户数据请求拦截
Mock.mock("/api/user/add", 'post', user.createUser);
Mock.mock("/api/user/edit", 'post',  user.updateUser);
Mock.mock("/api/user/del", 'post',  user.deleteUser);
Mock.mock(/api\/user\/getUser/, user.getUserList);

// 定义用户登录请求拦截
Mock.mock(/api\/permission\/getMenu/,'post', permission.getMenu);